import req from '@/utils/request'

// 新增合同
export function addContract(data) {
  return req.post('/api/human/contract/addContract', data)
}

// 发起合同查询(分页列表)
export function getList(data) {
  return req.post('/api/human/contract/page', data)
}

// 合同详细信息
export function getInfo(id) {
  return req.get(`/api/human/contract/${id}`)
}

// 删除合同
export function deleteInfo(data) {
  return req.delete('/api/human/contract', { data })
}

// 查询甲乙方对象
export function getChoosePeople(params) {
  return req.get('/api/human/contract/choosePeople', params)
}

// 查询甲乙方对象
export function getAuthObject(params) {
  return req.get(
    '/api/human/contractSubjectElectronicVisa/getAuthObject',
    params
  )
}

// 发起合同
export function sponsorSing(params) {
  return req.put('/api/human/contract/sponsorSing', params)
}

// 自动签署合同
export function sing(params) {
  return req.put('/api/human/contract/sing', params)
}

// 签署合同
export function chooseSign(params) {
  return req.put('/api/human/contract/chooseSign', params)
}

// 获取合同进度
export function getOperationRecord(params) {
  return req.get('/api/human/contract/getOperationRecord', params)
}
